package com.example.document.core;

public enum DocumentType {

	APPLICATION_PDF(1, "application/pdf", "pdf"),
	APPLICATION_DOC(2, "application/msword", "doc"), // microsoft office file format mime types
	APPLICATION_XLS(3, "application/vnd.ms-excel", "xls"), // "vnd" class is vendor specific
	APPLICATION_ODT(4, "application/vnd.oasis.opendocument.text", "odt"), // open office file format mime types
	APPLICATION_ODP(5, "application/vnd.oasis.opendocument.presentation", "odp"),
	APPLICATION_ODS(6, "application/vnd.oasis.opendocument.spreadsheet", "ods"),
	TEXT_CSV(7, "text/csv", "csv"),
	TEXT_RTF(8, "text/rtf", "rtf"),
	TEXT_XML(9, "text/xml", "xml"),
	APPLICATION_JSON(10, "application/json", "json");
	
	private int id;
	private String mime;
	private String ext;
	
	private DocumentType(int id, String mime, String ext) {
	   this.id = id;
	   this.mime = mime;
	   this.ext = ext;
   }
	
   public int getId() {
	   return id;
   }
   
   public String getMime() {
	   return mime;
   }
   
   public String getExt() {
	   return ext;
   }
	
}
